Skip to content

docs(ai): clearer guidance on sync tests#376

Merged
KSXGitHub merged 1 commit into
masterfrom
claude/fix-completion-generation-ouw7z
Mar 27, 2026
Merged

docs(ai): clearer guidance on sync tests#376
KSXGitHub merged 1 commit into
masterfrom
claude/fix-completion-generation-ouw7z

Conversation

@KSXGitHub

Copy link
Copy Markdown
Owner

This PR updates the AI instruction files across the repository to provide clearer guidance on CLI-related changes and test execution.

Changes made:

  • Added explicit instruction to run ./generate-completions.sh when CLI arguments, help text, or command-line output changes, with a strong warning against manual regeneration of completion files, help text, and USAGE.md
  • Enhanced test execution guidance to clarify that sync test failures should be handled by carefully reading error messages and running the exact command suggested by the test
  • Updated all four instruction files consistently:
    • .github/copilot-instructions.md
    • AGENTS.md
    • CLAUDE.md
    • template/ai-instructions/shared.md

Rationale:
These changes ensure that AI assistants and contributors understand the importance of using automated scripts for CLI-related documentation generation and provide better guidance for handling test failures, reducing manual errors and improving consistency across the codebase.

https://claude.ai/code/session_01Bxeem6wsV2g7vNLQRRHodx

AI agents were failing to discover and use the generate-completions.sh
script when sync tests failed, instead attempting to manually regenerate
completion files through various wrong approaches. This adds the script
to the AI instructions so agents know about it before encountering
failures, and adds general guidance to follow the exact commands that
sync test error messages provide.

https://claude.ai/code/session_01Bxeem6wsV2g7vNLQRRHodx

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the repository’s AI/contributor instruction docs to reduce CLI-doc drift and to make “sync test” failures easier to resolve by following the command shown in the test output.

Changes:

  • Add explicit guidance to run ./generate-completions.sh after CLI/help/output changes, and to avoid manual regeneration of generated CLI artifacts.
  • Clarify test-running guidance: when sync tests fail, read the error and run the exact command it instructs.
  • Apply the same updates consistently across the shared template and the generated instruction files.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
template/ai-instructions/shared.md Adds CLI artifact regeneration and sync-test failure handling guidance to the shared instruction template.
.github/copilot-instructions.md Mirrors the updated guidance for GitHub Copilot instructions.
AGENTS.md Mirrors the updated guidance for agent instructions.
CLAUDE.md Mirrors the updated guidance for Claude-specific instructions.

@KSXGitHub KSXGitHub marked this pull request as ready for review March 27, 2026 16:54
@KSXGitHub KSXGitHub merged commit c4b8aa7 into master Mar 27, 2026
17 checks passed
@KSXGitHub KSXGitHub deleted the claude/fix-completion-generation-ouw7z branch March 27, 2026 16:54
@github-actions

Copy link
Copy Markdown

Performance Regression Reports

commit: a833ed8

There are no regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants